package com.draven.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 收支统计VO
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FinanceStatVO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 收入总额
     */
    private BigDecimal totalIncome = BigDecimal.ZERO;

    /**
     * 支出总额
     */
    private BigDecimal totalExpense = BigDecimal.ZERO;

    /**
     * 收支结余
     */
    private BigDecimal balance = BigDecimal.ZERO;

    /**
     * 收入分类统计
     */
    private List<CategoryStat> incomeStats;

    /**
     * 支出分类统计
     */
    private List<CategoryStat> expenseStats;

    /**
     * 分类统计
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class CategoryStat implements Serializable {

        private static final long serialVersionUID = 1L;

        /**
         * 分类
         */
        private String category;

        /**
         * 金额
         */
        private BigDecimal amount = BigDecimal.ZERO;

        /**
         * 占比
         */
        private BigDecimal percentage = BigDecimal.ZERO;
    }
} 